ackage ${packageName};

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 数据模型
 * @author qp
 */
@Data
@Accessors(chain = true)
@TableName("${tableName}")
public class ${className} extends TenantEntity {

	private static final long serialVersionUID = 1L;

	<#-- 循环类型及属性 -->
	<#list attrs as attr>
	<#if attr.busiItemType2 == 1 && attr.busiItemType == 1>
	@ApiModelProperty(value = "${attr.label}")
	<#if attr.typeName?contains("Date")>
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	<#else>
	<#if attr.typeName?contains("Integer") || attr.typeName?contains("Long") || attr.typeName?contains("BigDecimal") || attr.typeName?contains("Double")>
	@JsonSerialize(using = ToStringSerializer.class, nullsUsing = NullSerializer.class)
	</#if>
	</#if>
	private ${attr.type} ${attr.camelName};

	</#if>
	</#list>
}